home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol A-4
/
(Vol A-4) Vol. A4.iso
/
Games
/
selfstorage.swf
/
scripts
/
frame_5
/
PlaceObject2_188_554
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-03-17
|
2KB
|
63 lines
onClipEvent(enterFrame){
if(_root.int_spiellaeuft == 1)
{
schwerpunktx = _root.mc_box0._x;
maxX = 0;
minX = 700;
ar = _root.arr_liegereihenfolge.length;
while(ar > 1)
{
nr = _root.arr_liegereihenfolge[ar - 1];
nr_darunter = _root.arr_liegereihenfolge[ar - 2];
maxXtemp = _root["mc_box" + nr]._x + _root["mc_box" + nr]._width / 2;
if(maxXtemp > maxX)
{
maxX = maxXtemp;
}
minXtemp = _root["mc_box" + nr]._x - _root["mc_box" + nr]._width / 2;
if(minXtemp < minX)
{
minX = minXtemp;
}
this._x = _root["mc_box" + nr]._x + _root["mc_box" + nr]._width / 2;
schwerpunktx = (maxX - minX) / 2 + minX;
this._x = schwerpunktx;
if(!this.hitTest(_root["mc_box" + nr_darunter]))
{
xcount = 1;
if(this._x >= _root["mc_box" + nr]._x)
{
trace("Sturz nach rechts");
ar_sturz = ar;
while(ar_sturz <= _root.arr_liegereihenfolge.length)
{
nr_sturz = _root.arr_liegereihenfolge[ar_sturz - 1];
_root["mc_box" + nr_sturz]._x += xcount * 2;
_root["mc_box" + nr_sturz].int_sturzrotation = 1;
_root["mc_box" + nr_sturz].int_absturz = 1;
_root["mc_box" + nr_sturz]._rotation += xcount * 2;
xcount++;
ar_sturz++;
}
}
else
{
ar_sturz = ar;
while(ar_sturz <= _root.arr_liegereihenfolge.length)
{
nr_sturz = _root.arr_liegereihenfolge[ar_sturz - 1];
_root["mc_box" + nr_sturz]._x -= xcount * 2;
_root["mc_box" + nr_sturz].int_sturzrotation = 1;
_root["mc_box" + nr_sturz].int_absturz = 1;
_root["mc_box" + nr_sturz]._rotation -= xcount * 2;
xcount++;
ar_sturz++;
}
}
ar = 1;
}
ar--;
}
}
}